<?php

namespace app\api\controller;

use app\common\controller\Api;
use think\Db;
use think\Model;

/**
 * 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index()
    {
        $this->success('请求成功');
    }

    public function test()
    {
        $datas = Db::table("star")->select();
        foreach ($datas as $val) {
            Db::table("star")->where('id', $val['id'])->update([
                'avatar' => "https://lclook.oss-cn-shenzhen.aliyuncs.com/loushi".$val['avatar']
            ]);
        }
    }
}
